package com.plugin.core.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 用餐详细记录实体类
 * 
 * @author mark
 * @date 2025-07-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("elder_dish_record")
@Schema(name = "ElderDishRecord", description = "用餐详细记录")
public class ElderDishRecord {

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "菜名称/类型id")
    @TableField("dish_name")
    private String dishName;

    @Schema(description = "长者ID")
    @TableField("elder_id")
    private Long elderId;

    @Schema(description = "菜品ID列表，逗号分隔")
    @TableField("dish_ids")
    private String dishIds;

    @Schema(description = "餐别：1-早餐，2-午餐，3-晚餐，4-加餐")
    @TableField("meal_time")
    private Integer mealTime;

    @Schema(description = "具体用餐时间")
    @TableField("dinner_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime dinnerTime;

    @Schema(description = "就餐方式：1-堂食，2-外带")
    @TableField("dinner_mode")
    private Integer dinnerMode;

    @Schema(description = "消费总金额")
    @TableField("total_amount")
    private BigDecimal totalAmount;

    @Schema(description = "是否是套餐(0不是;1是)")
    @TableField("is_set")
    private Integer isSet;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;

    @Schema(description = "是否删除：0-未删除，1-已删除")
    @TableField("del")
    private Integer del;
}
